home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 011 / batch.arc / CAPSOFF.ASM < prev    next >
Encoding:
Assembly Source File  |  1986-01-04  |  1.3 KB  |  81 lines

  1.  
  2. ;
  3.         page    60,132
  4.         title    Set Caps Lock Off
  5. ;
  6. ;    Author: Marty Prahl
  7. ;    Date:   10-Dec-1984
  8. ;    Rev:    1.0
  9. ;
  10. ;    Copyright (c) 1984 by Marty Prahl
  11. ;
  12. ;    Abstract:
  13. ;
  14. ;    Calling Sequence:
  15. ;
  16. ;        A>CAPSOFF
  17. ;
  18. ;
  19. ;
  20. ;----------------------------------------------------------------------------
  21. ;
  22. ;    Local Data
  23. ;
  24. ;----------------------------------------------------------------------------
  25. ;
  26. data    segment    at 40h
  27.     org    17h
  28. kb_flag    db    ?
  29.                 ;
  30.                 ; for a complete decription of the
  31.                 ; rom bios keyboard data area
  32.                 ; see the IBM PC-XT Technical Reference
  33.                 ; Appendix A page A-3
  34.                 ;
  35. data    ends
  36. ;
  37. ;----------------------------------------------------------------------
  38. ;
  39. ;    Caps Lock Off
  40. ;
  41. ;----------------------------------------------------------------------
  42. ;
  43. code_seg    segment
  44.         assume    cs:code_seg,ds:data
  45.  
  46. capsoff        proc    far
  47.  
  48.         push    ds        ; here we go again
  49.         mov    ax,data
  50.         mov    ds,ax
  51.  
  52.         mov    ah,kb_flag    ; grab the keyboard flag
  53.         and    ah,0bfh        ; now turn off the caps lock 
  54.         mov    kb_flag,ah
  55.  
  56.         pop    ds
  57.  
  58.         mov    al,0        ; no errorlevel
  59.         mov    ah,4ch        ; terminate
  60.         int    21h
  61.  
  62. capsoff        endp
  63.  
  64. code_seg    ends
  65.         end    capsoff
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.